package com.project.service.imp;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.project.bean.BuyCartBean;
import com.project.bean.BuyDetailBean;
import com.project.bean.BuyOrderBean;
import com.project.mapper.IBuyDetailMapper;
import com.project.mapper.IBuyOrderMapper;
import com.project.service.IBuyDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.time.LocalDate;
import java.util.List;

@Service
@Transactional
public class BuyDetailServiceImp implements IBuyDetailService {
    @Autowired
    private IBuyDetailMapper mapper;
    @Override
    public void addDetail(Integer orderId, List<BuyCartBean> list) {
        mapper.addDetail(orderId,list);
    }

    @Override
    public BuyOrderBean findById(Integer id) {
        return mapper.findById(id);
    }
}
